//
//  PictorialViewController.m
//  Pictorial
//
//  Created by SKY on 15/12/28.
//  Copyright © 2015年 sky. All rights reserved.
//

#import "PictorialViewController.h"
#import "HomeViewController.h"
#import "PictorialDetailViewController.h"

#import "PictorialView.h"
@interface PictorialViewController ()<PictorialViewDelegate>

@end

@implementation PictorialViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    PictorialView *pictorialView = [[[NSBundle mainBundle] loadNibNamed:@"PictorialPageView" owner:nil options:nil] firstObject];
    [self.view addSubview:pictorialView];
    pictorialView.delegate = self;

}
#pragma mark - PictorialViewDelegate
-(void)moveToPictorialDetailVC:(PictorialArticleModel *)model{
    
    PictorialDetailViewController *detailVC = [PictorialDetailViewController classInitializtion];
    detailVC.model = model;
    [self presentViewController:detailVC animated:YES completion:nil];
}
-(void)back{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
